package com.infinity.springboot.thymeleaf.service.impl;

import com.infinity.springboot.thymeleaf.dao.UserDao;
import com.infinity.springboot.thymeleaf.model.User;
import com.infinity.springboot.thymeleaf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: wuxiang
 * @Description:
 * @Date: Create in 2020/6/16 21:00
 */

@Service
public class UserServiceImpl implements UserService {

    @Autowired
//    @Resource
    private UserDao userDao;

    @Override
    public User getUser(Integer userId) {


        User byUserName = userDao.findByUserName("张三");
        return userDao.getOne(userId);
    }
}
